﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;

namespace Apq.Net
{
	/// <summary>
	/// WebRequest助手
	/// </summary>
	public class WebRequestHelper
	{
		/// <summary>
		/// 设置起点
		/// </summary>
		public static void AddRange(WebRequest Requst, long PosBegin)
		{
			if (Requst is System.Net.HttpWebRequest)
			{
				System.Net.HttpWebRequest r = Requst as System.Net.HttpWebRequest;
				r.AddRange(PosBegin);
			}
			if (Requst is System.Net.FtpWebRequest)
			{
				System.Net.FtpWebRequest r = Requst as System.Net.FtpWebRequest;
				r.ContentOffset = PosBegin;
			}
		}
	}
}
